<require>MediaQuery</require>

<script>
const mediaQuery = new MediaQuery('screen and (max-width: 1000px)');
mediaQuery.on('match', () => console.log('match'));
mediaQuery.on('unmatch', () => console.log('unmatch'));  
</script>